﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ServerCommon.Net
{
    // 域类型
    public enum EnumDomainType
    {
        Unknown,
        Local,
        Global,
    }

    // 节点网络类型
    public enum EnumNodeNetType
    {
        Error = 0,
        Service = 1,
        Client = 2,
    }

    // 一般标记网络连接的远端节点的服务类型。
    public enum EnumNodeServiceType
    {
        Error = 0,

        Client,
        Channel,
        Platform,
        Database,
        Login,
        Game,
        Gateway,
        World,
        GM,
        OutsideIP,//外网ip，给serverlist使用
        Any,
    }

    // 节点状态
    public enum EnumNodeStatusType
    {
        Unknow,
        Init,
        Run,
        Pause,
        Stop,
        Release
    }

    /// <summary>
    /// 网络错误消息码
    /// </summary>
    public enum EnumErrorCode
    {
        Success = 0,
        ListenFail,
        ConnectFail,
        IOEventArgsIsNull,
        DataTokenIsNull,
        OverMaxMessageLen,
        LessZero,
        Pending,
        FaildProcessMessage,
    }

    public enum EnumConnectionEventType
    {
        Unknown,
        Accept,
        Connect,
        Disconnect,
        Connect_Error,
        Recv,
        Close,
    }
}
